Ext.define('Admin.view.organization.OrganizationPieChart', {
    extend: 'Ext.Panel',
    xtype: 'organization-piechart',

    requires: [
        'Ext.chart.PolarChart',
        'Ext.chart.interactions.Rotate',
        'Ext.chart.interactions.ItemHighlight',
        'Ext.chart.series.Pie'
    ],

    controller: 'organizationPieChartController',

    width: 650,

    items: [{
        xtype: 'polar',
        reference: 'organizatonChart',
        captions: {
            title: '组织人数占比图',
        },
        width: '100%',
        height: 500,
        insetPadding: 40,
        innerPadding: 20,
        store: {
            type: 'organizationPieStore'
        },
        legend: {
            docked: 'bottom'
        },
        interactions: ['rotate'],
        series: [{
            type: 'pie',
            angleField: 'angle',
            label: {
                field: 'name',
                calloutLine: {
                    length: 60,
                    width: 3
                }
            },
            highlight: true,
            tooltip: {
                trackMouse: true,
                renderer: 'onPieTooltipRender'
            }
        }]
    }]
});